<html>
<head><meta charset="utf-8"><title>loans in scope · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html">loans in scope</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205812148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/loans%20in%20scope/near/205812148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html#205812148">(Aug 03 2020 at 15:59)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you mentioned before you wanted polonius to basically compute all loans in scope for all origins, and I wondered about that, did we absolutely need all loans for a reason that I didn't know yet (I was wondering whether that would be needed for diagnostics for example). I was looking for ways to avoid materializing and propagating loans if possible, or at least delaying them or computing them lazily for as long as we could until we knew for sure that there was an error. (I do realize that right now propagating loans is <em>how</em> we detect errors, and would require an alternative way of doing so)</p>



<a name="205813518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/loans%20in%20scope/near/205813518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html#205813518">(Aug 03 2020 at 16:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116113">@lqd</span> I don't recall expressing an opinion about this ...</p>



<a name="205813551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/loans%20in%20scope/near/205813551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html#205813551">(Aug 03 2020 at 16:12)</a>:</h4>
<p>off the top of my head I can't see why we need to compute all loans in scope for all origins</p>



<a name="205813616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/loans%20in%20scope/near/205813616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html#205813616">(Aug 03 2020 at 16:12)</a>:</h4>
<p>and if we <em>did</em> need it for diagnostics, which I don't think we do, I imagine we could compute it on demand</p>



<a name="205814179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/loans%20in%20scope/near/205814179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html#205814179">(Aug 03 2020 at 16:17)</a>:</h4>
<p>I mean we currently eagerly compute all loans contained at every point in the cfg (with some possible filtering wrt "all origins") but couldn't see a reason that we absolutely had to and wanted to make sure I wasn't missing something :)</p>



<a name="205814209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/loans%20in%20scope/near/205814209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html#205814209">(Aug 03 2020 at 16:17)</a>:</h4>
<p>nope, I think I always expected us to use feedback to limit that</p>



<a name="205814287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/loans%20in%20scope/near/205814287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/loans.20in.20scope.html#205814287">(Aug 03 2020 at 16:18)</a>:</h4>
<p>nice, thank you :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>